package org.cpar.compiler.nodes;

import org.antlr.runtime.Token;
import org.cpar.compiler.CPARNode;
import org.cpar.compiler.ICodeWriter;

public class MainFunction extends CPARNode {

	public MainFunction(Token nextToken) {
		super(nextToken);
	}

	public void accept(ICodeWriter writer) {
		writer.visit(this);
	}

	public CPARNode getClosePar() {
		return ((CPARNode) getChild(0));
	}

	public CPARNode getVarDeclaration() {
		return getChildNode(1);
	}
	
	public CPARNode getBodyDeclaration(){
		return getChildNode(2);
	}
	
//	public CPARNode getOpenBody(){
//		return getChildNode(4);
//	}

}
